#!/bin/bash
set -euo pipefail
BaseDir=$(cd "$(dirname "$0")"; pwd)
cd ${BaseDir}

[ -f ./LibreOffice_24.8.3_Linux_x86-64_rpm.tar.gz ] || 
curl -fL -O "https://download.documentfoundation.org/libreoffice/stable/24.8.3/rpm/x86_64/LibreOffice_24.8.3_Linux_x86-64_rpm.tar.gz"

[ -f ./LibreOffice_24.8.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz ] || 
curl -fL -O "https://download.documentfoundation.org/libreoffice/stable/24.8.3/rpm/x86_64/LibreOffice_24.8.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz"

# 清华大学开源镜像下载：思源黑体，思源宋体
[ -f ./SourceHanSerifCN.zip ] || 
curl -fL -O "https://mirrors.tuna.tsinghua.edu.cn/adobe-fonts/source-han-serif/SubsetOTF/SourceHanSerifCN.zip"

echo "done"
